package connection;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBConnection {

	public static Connection createConnection() throws SQLException
	{
			
	Connection con=null;
	String url = "jdbc:oracle:thin:@202.141.152.20:1521:xe"; 
	String username = "FP12_SEPROJECT_GRP2";
	String password = "FP12_SEPROJECT_GRP2";
	//System.out.println("DB Connection success");
	try
	{
		try
		{
				Class.forName("oracle.jdbc.driver.OracleDriver");
				//System.out.println("DB Driver Loaded");
		}
		catch (ClassNotFoundException e)
		{
				e.printStackTrace();
		}
		
			con = DriverManager.getConnection(url, username, password);
			//System.out.println("DB Connection success");
		
	}
	catch (Exception e)
	{
	e.printStackTrace();
	}

	return con;
	}
}
